package com.wn.icloud.provider.uac.mapper;

import com.wn.icloud.provider.uac.entity.Group;
import org.apache.ibatis.annotations.Param;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;

public interface GroupMapper extends Mapper<Group> {
    void deleteGroupMembersById(@Param("groupId") int groupId);

    void deleteGroupLeadersById(@Param("groupId") int groupId);

    void insertGroupMembersById(@Param("groupId") int groupId, @Param("userId") int userId);

    void insertGroupLeadersById(@Param("groupId") int groupId, @Param("userId") int userId);

    List<Group> findByUserIdAndCode(@Param("userId") int userId, @Param("code") String code);

    String selectGroupLeadersByUserId(@Param("userId") String userId);

    List<Group> selectGroupByUserId(@Param("userId") String userId);

    List<Group> selectGroupMemberByUserId(@Param("userId") String userId);
}